package main

import "fmt"

func main() {

	space := TrimSpace([]byte("21212 c  2   1   323"))
	fmt.Printf("%v", string(space))
}

func TrimSpace(input []byte) []byte {
	b := input[:0]
	for _, v := range input {
		if v != ' ' {
			b = append(b, v)
		}
	}
	return b
}
